package com.heima.mapper;

import com.github.pagehelper.Page;
import com.heima.pojo.dto.NodeQueryDTO;
import com.heima.pojo.entity.Business;
import com.heima.pojo.entity.Node;
import com.heima.pojo.entity.TbNode;
import com.heima.pojo.vo.BusinessTypeVO;
import com.heima.pojo.vo.NodeVO;
import com.heima.pojo.vo.VendingMachineVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NodeMapper {
    Page<NodeVO> search(NodeQueryDTO nodeQueryDTO);

    @Select("select * from tb_business")
    List<Business> searchBusiness();


    int insertBusiness(Node node);


    List<VendingMachineVO> selectVmByNodeId(String nodeId);

    Boolean updatenode(String nodeId, TbNode tbNode);

    @Delete("delete from tb_node where id = #{nodeId}")
    int deleteNode(String nodeId);
    

}